package AJava1月.EJava第五周;

import java.util.Scanner;

public class Iswitch新特性 {

    //JDK12以后推出的特性


    public static void main(String[] args) {

        int number = 3;

        switch (number) {
            case 1 ->{
                System.out.println("跑步");
            }
            case 2 ->{
                System.out.println("跑1步");
            }
            case 3 ->{
                System.out.println("跑2步");
            }
            case 4 ->{
                System.out.println("跑3步");
            }
            case 5 ->{
                System.out.println("跑4步");
            }
            default -> {
                System.out.println("hah");
            }
        }
    }
}
